<!-- inc:head -->
<script type="text/javascript" src="{echo add_js('cate.js')}"></script>
<script type="text/javascript">
function cate_delete(id)
{
	$.dialog.confirm("{lang确定要删除此分类吗？}",function(){
		var url = get_url("cate","delete");
		url += "&id="+id;
		var rs = $.phpok.json(url);
		if(rs.status == "ok"){
			$.phpok.reload();
		}else{
			$.dialog.alert(rs.content);
			return false;
		}
	});
}

</script>
<div class="tips clearfix">
	<div class="action"><a href="{echo admin_url('cate','set')}">{lang添加根分类}</a></div>
	{lang您当前的位置：}
	<a href="{echo admin_url('fields')}">{lang栏目管理}</a>
	&raquo; {lang栏目列表}
</div>
<div class="cate_list clearfix">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
	<th class="id">ID</th>
	<th width="30">&nbsp;</th>
	<th class="title">{lang分类名称}</th>
	<th width="80">{lang排序}</th>
	<th width="50">&nbsp;</th>
	<th class="lft">{lang操作}</th>
</tr>
<!-- run:$tab_i = 0; -->
<!-- foreach($rslist AS $key=>$value) -->
<!-- run:$tab_i++ -->
<tr{if $key%2 == ""} class="list"{/if}>
	<td class="center gray">{$value.id}</td>
	<td><span class="status{$value.status}" id="status_{$value.id}" onclick="phpok_status({$value.id},'{url ctrl=cate func=status/}')" value="{$value.status}"></span></td>
	<td>
		<table cellpadding="0" cellspacing="0">
		<tr>
			<!-- for($i=1;$i<$value[_layer];$i++) -->
			<td class="cate_line">&nbsp;</td>
			<!-- /for -->
			<!-- if $value[_layer]>0 -->
				<td class="cate_middle">&nbsp;</td>
			<!-- /if -->
			<td><label for="id_{$value.id}">{$value.title}<span class="gray i">（{$value.identifier}）</span></label></td>
		</tr>
		</table>
	</td>
	<td class="center"><input type="text" id="taxis_{$value.id}" class="cate_taxis" value="{$value.taxis}" tabindex="{$tab_i}" onblur="update_taxis('{$value.id}')" /></td>
	<td id="taxis_submit_{$value.id}">&nbsp;</td>
	<td>
		<div class="button-group">
			<input type="button" value="{lang添加子分类}" onclick="$.phpok.go('{url ctrl=cate func=set parent_id=$value.id/}')" class="phpok-btn" />
			<input type="button" value="{lang修改}" onclick="$.phpok.go('{url ctrl=cate func=set id=$value.id/}')" class="phpok-btn" />
			<input type="button" value="{lang删除}" onclick="cate_delete('{$value.id}')" class="phpok-btn" />
		</div>
		
	</td>
</tr>
<!-- /foreach -->
</table>
</div>
<!-- inc:foot -->
